import ILoginByPhoneForm from '@/model/form/user/ILoginByPhoneForm'
import IResVO from '@/model/vo/common/IResVO'
import $http from '@/util/http'
import { AxiosResponse } from 'axios'

// 手机号 登录/注册
export default function loginPhoneAPi(form: ILoginByPhoneForm) {
  return $http.post<IResVO, AxiosResponse<IResVO>, ILoginByPhoneForm>(
    '/login/phone',
    form,
    {
      timeout: 20000,
      headers: {
        hiddenErrorMsg: true, // 隐藏接口请求报错提示
      },
    }
  )
}
